package com.njwb.day18.thd;

public class ThreadDemo03 {
    public static void main(String[] args) {
        StopThread stopThread = new StopThread() ;
        Thread st = new Thread(stopThread);
        st.start();
        //休眠3秒
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        stopThread.stopThread();

        //st.stop();
        System.out.println("线程执行结束");

    }
}
